# 遍历
magicians = ['alice', 'david', 'carolina']
for m in magicians:
    print(m)
print("over")
print("============================================================")

# range使用
for value in range(1, 5):
    print(value)

print("============================================================")
for value in range(5):
    print(value)

print("============================================================")
for value in range(2, 11, 2):
    print(value)


print("============================================================")
squares = []
for value in range(1, 5):
    squares.append(value ** 2)
print(squares)

print(max(squares))
print(min(squares))
print(sum(squares))



print("==========================列表推导==================================")
squares = [value ** 3 for value in range(1,23)]
print(squares)